home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / Development Tools & Languages / • Other Platforms / PCCTS / support / rexpr / test.c < prev   
Encoding:
C/C++ Source or Header  |  1994-09-14  |  412 b   |  20 lines  |  [TEXT/MPS ]

  1. #include <stdio.h>
  2. #include "rexpr.h"
  3.  
  4. /*
  5.  * test for rexpr().
  6.  * To make this test:
  7.  *    cc -o rexpr test.c rexpr.c
  8.  * Then from command line type:
  9.  *    rexpr r string
  10.  * where r is the regular expression that decribes a language
  11.  * and string is the string to verify.
  12.  */
  13. main(argc,argv)
  14. int argc;
  15. char *argv[];
  16. {
  17.     if ( argc!=3 ) fprintf(stderr,"rexpr: expr s\n");
  18.     else printf("%d\n", rexpr(argv[1], argv[2]));
  19. }
  20.